package com.youpai.platform.biggod.web.api;

import com.youpai.platform.biggod.service.service.BigGodService;
import com.youpai.platform.biggod.web.entity.dto.BigGodDto;
import com.youpai.platform.biggod.web.entity.dto.BigGodListDto;
import com.youpai.platform.biggod.web.entity.dto.CategoryDto;
import com.youpai.platform.biggod.web.entity.req.BigGodFreezeReq;
import com.youpai.platform.biggod.web.entity.req.BigGodListReq;
import com.youpai.platform.biggod.web.entity.req.BigGodReq;
import com.youpai.platform.biggod.web.entity.req.CategoryReq;
import com.youpai.platform.biggod.web.entity.resp.BigGodResp;
import com.youpai.platform.common.entity.resp.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 大神相关controller
 * @Author:huanghao
 * @Date:2022/11/17
 */
@Slf4j
@RestController
@RequestMapping(value = "/biggod")
@Api(value = "BigGodController", tags = "大神相关")
public class BigGodController {

    @Resource
    private BigGodService bigGodService;

    @ApiOperation(value = "获取大神列表")
    @PostMapping(value = "/getList")
    public BaseResponse<List<BigGodListDto>> getBigGodList(@RequestBody BigGodListReq req) {
        return BaseResponse.success(bigGodService.getBigGodList(req));
    }

    @ApiOperation(value = "获取大神详情")
    @PostMapping(value = "/getGod")
    public BaseResponse<BigGodDto> getGodSkills(@RequestBody BigGodReq req) {
        return BaseResponse.success(bigGodService.getGodSkills(req));
    }

    @ApiOperation(value = "冻结大神")
    @PostMapping(value = "/freezeGod")
    public BaseResponse<BigGodResp> freezeGod(@RequestBody BigGodFreezeReq req) {
        return BaseResponse.success(bigGodService.freezeGod(req));
    }

}
